import request from '@/utils/request'

// 查询因私出国审批记录列表
export function listLeave(query) {
	return request({
		url: '/spm/leave/list',
		method: 'get',
		params: query
	})
}

// 查询因私出国审批记录详细
export function getLeave(leaveId) {
	return request({
		url: '/spm/leave/' + leaveId,
		method: 'get'
	})
}

// 新增因私出国审批记录
export function addLeave(data) {
	return request({
		url: '/spm/leave',
		method: 'post',
		data: data
	})
}

// 修改因私出国审批记录
export function updateLeave(data) {
	return request({
		url: '/spm/leave',
		method: 'put',
		data: data
	})
}

// 删除因私出国审批记录
export function delLeave(leaveId) {
	return request({
		url: '/spm/leave/' + leaveId,
		method: 'delete'
	})
}